<template>
  <div class="position">
    <span class="iconfont position__icon">&#xe605;</span>
    <div class="position__title">北京理工大学国防科技园2号楼10层</div>
    <span class="iconfont position__notice">&#xe7c4;</span>
  </div>
  <div class="search">
    <span class="iconfont ">&#xe933;</span>
    <input type="text" placeholder="山姆会员商店优惠商品" />
  </div>
  <div class="banner">
    <img
      src="http://www.dell-lee.com/imgs/vue3/banner.jpg"
      class="banner__img"
      alt=""
    />
  </div>
  <ul class="icons">
    <li class="icons__item" v-for="item in iconlist" :key="item.imgSrc">
      <img class="icons__item__img" :src="item.imgSrc" />
      <p class="icons__item__desc">{{ item.text }}</p>
    </li>
  </ul>
  <div class="gap"></div>
</template>
<script>
export default {
  name: 'StaticPart',
  setup(props) {
    const iconlist = [
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/超市.png',
        text: '超市便利'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/菜市场.png',
        text: '菜市场'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/水果店.png',
        text: '水果店'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/鲜花.png',
        text: '鲜花绿植'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/医药健康.png',
        text: '医药健康'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/家居.png',
        text: '家居时尚'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3//蛋糕.png',
        text: '烘培蛋糕'
      },
      { imgSrc: 'http://www.dell-lee.com/imgs/vue3/签到.png', text: '签到' },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/大牌免运.png',
        text: '大牌免运'
      },
      {
        imgSrc: 'http://www.dell-lee.com/imgs/vue3/红包.png',
        text: '红包套餐'
      }
    ]
    return { iconlist }
  }
}
</script>
<style lang="scss" scoped>
@import '../../style/common.scss';
.position {
  margin: 0.16rem 0;
  background: $bgColor;
  display: flex;
  text-align: center;
  &__title {
    font-family: PingFangSC-Regular;
    font-size: 0.16rem;
    color: $content-fontColor;
    line-height: 0.22rem;
    flex: 1;
    vertical-align: middle;
    text-align: left;
    @include ellipsis;
  }
  .position__icon {
    margin-right: 0.09rem;
    font-size: 0.2rem;
    vertical-align: middle;
  }
  .position__notice {
    font-size: 0.2rem;
  }
}
.search {
  background: $search-bgColor;
  border-radius: 0.16rem;
  line-height: 0.33rem;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding-left: 0.16rem;
  margin-bottom: 0.2rem;
  input {
    color: $search-fontColor;
    font-size: 0.14rem;
    width: 100%;
    height: 100%;
    outline: none;
    border: none;
    background: $search-bgColor;
    padding-left: 0.15rem;
    &::-webkit-input-placeholder {
      color: $search-fontColor;
    }
  }
}
.banner {
  width: 100%;
  padding-bottom: 25.4%;
  height: 0;
  .banner__img {
    width: 100%;
  }
}
.icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.16rem;
  .icons__item {
    flex: 20%;
    text-align: center;
    color: $content-fontColor;
    .icons__item__img {
      width: 0.4rem;
      height: 0.4rem;
      display: block;
      margin: 0.16rem auto 0.06rem auto;
    }
  }
}
.gap {
  background: $content-bgColor;
  height: 0.1rem;
  margin-left: -0.18rem;
  margin-right: -0.18rem;
}
</style>
